package Practice9_MethodReference.p2;

public class Math {
    private String name;
    public static int abs(int num) {
        if (num < 0) {
            return -num;
        } else {
            return num;
        }
    }

    public int test1(Integer num) {
        return num * 2;
    }

    public int test2(Object... args) {
        return (int)args[0] * 2;
    }

    @Override
    public String toString() {
        return "Math{" +
                "name='" + name + '\'' +
                '}';
    }

    public Math(Object... args) {
        this.name = args[0].toString();
    }

    public Math() {
    }
}
